home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 168 / library / gem.h < prev    next >
C/C++ Source or Header  |  1988-04-30  |  5KB  |  221 lines

  1. /* gem/vdi definitions and structures */
  2.  
  3. struct object {
  4.     int    next;        /* index of next object in the tree    */
  5.     int    start;        /* index of first subordinate        */
  6.     int    last;        /* index of last subordinate        */
  7.     int     type;        /* type of the object            */
  8.     int    flags;        /* selectability of the objects        */
  9.     int    status;        /* state of the object            */
  10.     int    *spec;        /* pointer to object data structure    */
  11.     int    x;        /* x coord relative to parent        */
  12.     int    y;        /* y coord relative to parent        */
  13.     int    w;        /* width of the object            */
  14.     int    h;        /* height of the object            */
  15. };
  16.  
  17. /* object types */
  18.  
  19. #define BOX    20
  20. #define TEXT    21
  21. #define BOXTEXT    22
  22. #define IMAGE    23
  23. #define PROGDEF    24
  24. #define IBOX    25
  25. #define BUTTON    26
  26. #define BOXCHAR    27
  27. #define STRING    28
  28. #define FTEXT    29
  29. #define FBOXT    30
  30. #define ICON    31
  31. #define TITLE    32
  32.  
  33. /* object flags */
  34.  
  35. #define NONE    0x00
  36. #define SELECT    0x01
  37. #define DEFAULT    0x02
  38. #define EXIT    0x04
  39. #define EDIT    0x08
  40. #define RBUTTON    0x10
  41. #define LASTOBJ    0x20
  42. #define TOUCHX    0x40
  43. #define HIDE    0x80
  44. #define INDIR    0x100
  45.  
  46. /* object status */
  47.  
  48. #define CROSSED    0x02
  49. #define CHECKED    0x04
  50. #define DISABLE    0x08
  51. #define OUTLINE    0x10
  52. #define SHADOW    0x20
  53.  
  54. struct tedinfo {
  55.     char    *text;        /* string to be output            */
  56.     char    *tmplt;        /* template for the string        */
  57.     char    *valid;        /* permission string for input        */
  58.     int    font;        /* character set (normal 3, small 5)    */
  59.     int    res1;        /* reserved                */
  60.     int     just;        /* justify (left 0, right 1, center 2)    */
  61.     int    color;        /* text color                */
  62.     int    res2;        /* reserved                */
  63.     int    thick;        /* border thickness -127 to 128        */
  64.     int     txtlen;        /* length of the string            */
  65.     int    tmplen;        /* length of the template        */
  66. };
  67.  
  68. /*
  69.  * vdi structure definitions and defines
  70.  */
  71.  
  72. /* color indices */
  73. #define    WHITE        0
  74. #define    BLACK        1
  75. #define    RED        2
  76. #define    GREEN        3
  77. #define    BLUE        4
  78. #define    CYAN        5
  79. #define    YELLOW        6
  80. #define    MAGENTA        7
  81. #define    LOW_WHITE    8
  82. #define    GREY        9
  83. #define    LIGHT_RED    10
  84. #define LIGHT_GREEN    11
  85. #define    LIGHT_BLUE    12
  86. #define    LIGHT_CYAN    13
  87. #define    LIGHT_YELLOW    14
  88. #define    LIGHT_MAGENTA    15
  89.  
  90. /* writing modes */
  91. #define    WR_REPLACE    1
  92. #define    WR_TRANSPARENT    2
  93. #define    WR_XOR        3
  94. #define    WR_REVTRANS    4
  95.  
  96. /* marker types */
  97. #define    DOT_MTYPE    1
  98. #define PLUS_MTYPE    2
  99. #define ASTERISK_MTYPE    3
  100. #define    SQUARE_MTYPE    4
  101. #define    X_MTYPE        5
  102. #define    DIAMOND_MTYPE    6
  103.  
  104. /* end styles */
  105. #define SQUARE_ESTYLE    0    /* default */
  106. #define ARROW_ESTYLE    1
  107. #define ROUND_ESTYLE    2
  108.  
  109. /* line types */
  110. #define SOLID_LTYPE    1
  111. #define LONG_DASH_LTYPE    2
  112. #define DOT_LTYPE    3
  113. #define DASHDOT_LTYPE    4
  114. #define DASH_LTYPE    5
  115. #define    DASHDOTDOT_LTYPE 6
  116. #define USERDEF_LTYPE    7
  117.  
  118. /* text alignment */
  119. #define LEFTJUST_HOR    0    /* default */
  120. #define CENTERJUST_HOR    1
  121. #define RIGHTJUST_HOR    2
  122. #define BASELINE_VER    0    /* default */
  123. #define HALFLINE_VER    1
  124. #define ASCENTLINE_VER    2
  125. #define BOTTOM_VER    3
  126. #define DESCENT_VER    4
  127. #define TOP_VER        5
  128.  
  129. /* text effects */
  130. #define THICK_EFCT    1
  131. #define LIGHT_EFCT    2
  132. #define SKEW_EFCT    4
  133. #define UNDERLINE_EFCT    8
  134. #define OUTLINE_EFCT    16
  135. #define SHADOW_EFCT    32
  136.  
  137. /* fill interior styles */
  138. #define HOLLOW_IS    0
  139. #define SOLID_IS    1
  140. #define PATTERN_IS    2
  141. #define HATCH_IS    3
  142. #define USERDEF_IS    4
  143.  
  144. /* raster copy modes */
  145. #define    ALL_ZEROS    0
  146. #define S_AND_D        1
  147. #define    S_AND_NOTD    2
  148. #define S_ONLY        3
  149. #define NOTS_AND_D    4
  150. #define NOCHANGE    5
  151. #define    S_XOR_D        6
  152. #define    S_OR_D        7
  153. #define NOTS_AND_NOTD    8
  154. #define NOTS_XOR_NOTD    9
  155. #define NOT_D        10
  156. #define S_OR_NOTD    11
  157. #define NOT_S        12
  158. #define NOTS_OR_D    13
  159. #define NOTS_OR_NOTD    14
  160. #define ALL_ONES    15
  161.  
  162. struct vdi_openin {     /* used in v_opnvwk */
  163.     short    linetype,    /* 0 to 6 */
  164.         linecolor,    /* 0=white 1=black */
  165.         marktype,    /* 0 to 6 */
  166.         markcolor,
  167.         textfont,
  168.         textcolor,
  169.         fillstyle,
  170.         fillcolor,
  171.         promptflag;
  172. };
  173.  
  174. struct    vdi_openout {    /* used in v_opnvwk */
  175.     short    maxx, maxy, flag, pelwidth, pelheight, numcharhght, numlinetyp,
  176.         numlinewid, nummarktyp,    nummarksiz, numgfonts, numpatterns,
  177.         numhatch, numcolors, numgdp, gdplist[10], gdpattr[10],
  178.         doescolor, rotstext, canfill, pixelops,    locateflg, valuatflg,
  179.         choiceflg, stringflg, stationtyp, devicetyp, numwrite,
  180.         inputlevel, alignstext,    inkingflg, rubberband, maxndcx,
  181.         maxndcy, version[5];
  182. };
  183.  
  184. struct    vdi_mattr {    /* used in vqm_attributes */
  185.     short    marktyp, markcolor, markmode, markwid, markhgt;
  186. };
  187.  
  188. struct    vdi_lattr {    /* used in vql_attributes */
  189.     short    linetyp, linecolor, linemode, beginstyle, endstyle, linewid;
  190. };
  191.  
  192. struct    vdi_fattr {    /* used in vqf_attributes */
  193.     short    insidestyle, color, style, wrmode, perimeter;
  194. };
  195.  
  196. struct    vdi_tattr {     /* used in vqt_attributes */
  197.     short    textface, color, angle, halign, valign, wrmode,
  198.         charwid, charhgt, charcellw, charcellh;
  199. };
  200.  
  201. struct    vdi_form {    /* used in vsc_form */
  202.     short    xhotspot, yhotspot, maskcolor, pntrcolor,
  203.         maskshape[16], pntrshape[16];
  204. };
  205.  
  206. /*
  207.  * Memory Form Definition Block
  208.  *
  209.  */
  210.  
  211. struct mfdb {
  212.     char    *fd_addr;    /* Address of upper left corner of first */
  213.                              /* raster plane. If NULL then screen     */
  214.     short    fd_w;         /* Form width in pels                    */
  215.     short    fd_h;        /* Form height in pels                   */
  216.     short    fd_wdwidth;  /* Form width in words                   */
  217.     short    fd_stand;    /* Form format 0= device spec 1=standard */
  218.     short    fd_nplanes;  /* Number of memory planes               */
  219.     short    dummy[3];
  220. };
  221.